using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace HuoSan
{
    public class AsrParams
    {
        public App app;
        public User user;
        public Audio audio;
        public Request request;
    }
    
    public class App
    {
       public string appid ="6369345100" ;
       public string cluster="volcengine_streaming_commo";
       public string token ="VVGpAR6xVinDHcepQeVsdc1LzTQfF8Eq";
    }
    
    public class User
    {
        public string uid = Guid.NewGuid().ToString();
    }
    
    public class Request
    {
        public string reqid = Guid.NewGuid().ToString();
        public string workflow ="audio_in,resample,partition,vad,fe,decode";
        public int nbest = 1;
        public bool show_utterances = true;
        //public string result_type;
        public int sequence =1;
    }
    
    public class AsrResponse
    {
       public string reqid = "unknow";
       public int code = 0;
       public string message = "";
       public int sequence = 0;
       public Result[] result;
       public Addition addition;
    }
    
    public class Result
    {
        public string text;
        public int confidence;
        public string language;
        public Utterances[] utterances;
        public float global_confidence;
    }
    
    public class Utterances
    {
        public string text;
        public int start_time;
        public int end_time;
        public bool definite;
        public string language;
        public Words[] words;
    }
    
    public class Words
    {
        public string text;
        public int start_time;
        public int end_time;
        public int blank_duration;
    }

    public class Audio
    {
        public string format = "pcm";
        public int rate = 16000;
        public int bits = 16;
        public int channel = 1;
        public string language = "zh-CN";
    }
    
    public class Addition
    {
        public string duration;
    }
}

